package com.atguigu.gamll1021.gmall1021_publisher.mapper;

import com.atguigu.gamll1021.gmall1021_publisher.bean.ProvinceStats;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//持久层，与数据库进行交互
public interface ProvinceStatsMapper {
    //查询地区表中的数据，各个地区的金额
    @Select("select province_id,province_name,sum(order_amount) order_amount " +
            " from province_stats_1021 where toYYYYMMDD(stt)=#{date} " +
            " group by province_id,province_name")
    List<ProvinceStats> selectProvinceStats(Integer date);

}
